﻿using System.Collections.ObjectModel;

namespace HobSoft.SoccerBet2014.Client.ViewModels
{
    using dm = Domain.Models;
    public class OddsTypeShellModels : ViewModelBase
    {
        private static ObservableCollection<OddsTypeShellModels> _oddsTypeList = new ObservableCollection<OddsTypeShellModels>();
        static OddsTypeShellModels()
        {
            _oddsTypeList.Add(new OddsTypeShellModels(dm.Odds.MarketType.G1X2, "滚球 全场 1X2", true));
            _oddsTypeList.Add(new OddsTypeShellModels(dm.Odds.MarketType.GOU, "滚球 全场 大小", true));
            _oddsTypeList.Add(new OddsTypeShellModels(dm.Odds.MarketType.GHDP, "滚球 全场 让球", true));
            _oddsTypeList.Add(new OddsTypeShellModels(dm.Odds.MarketType.FH1X2, "滚球 半场 1X2", true));
            _oddsTypeList.Add(new OddsTypeShellModels(dm.Odds.MarketType.FHOU, "滚球 半场 大小", true));
            _oddsTypeList.Add(new OddsTypeShellModels(dm.Odds.MarketType.FHHDP, "滚球 半场 让球", true));
        }
        public OddsTypeShellModels()
        {
            models = new ReadOnlyObservableCollection<OddsTypeShellModels>(_oddsTypeList);
        }
        private ReadOnlyObservableCollection<OddsTypeShellModels> models;
        public ReadOnlyObservableCollection<OddsTypeShellModels> Models
        {
            get
            {
                return models;
            }
        }

        public OddsTypeShellModels(dm.Odds.MarketType type, string name, bool isLive)
        {
            Type = type;
            Name = name;
            Live = isLive;
        }

        private dm.Odds.MarketType _type;
        public dm.Odds.MarketType Type
        {
            get { return _type; }
            set { PropertyValueChange(ref _type, value, "Type"); }
        }

        private string _name;
        public string Name
        {
            get { return _name; }
            set { PropertyValueChange(ref _name, value, "Name"); }
        }

        private bool _live;
        public bool Live
        {
            get { return _live; }
            set { PropertyValueChange(ref _live, value, "Live"); }
        }
    }
}
